<!--
 * 自己写的vue
 * @module myVue
 * @author zhanghuan
 * @date 2021/03/14
-->
<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title></title>
        <link rel="Shortcut Icon" href="favicon.ico">
    </head>
    <body>
        <div id="app">
            <h1>插值表达式</h1>
            <div>{{msg}}</div>
            <p>{{count}}</p>
            <h1>v-text</h1>
            <div v-text="msg"></div>
            <h1>v-model</h1>
            <input v-model="count" />
            <h1>v-html</h1>
            <div v-html="html"></div>
            <h1>v-on</h1>
            <button v-on:click="handleClick">点我呀！</button>
        </div>
        <script src="./js/dep.js"></script>
        <script src="./js/watcher.js"></script>
        <script src="./js/compiler.js"></script>
        <script src="./js/observer.js"></script>
        <script src="./js/vue.js"></script>
        <script>
            const vm = new Vue({
                el: '#app',
                data: {
                    msg: 'hello',
                    count: 1,
                    person: {
                        name: "lisi"
                    },
                    html: '<p>这是html</p>'
                },
                methods: {
                    handleClick() {
                        alert('软点儿！疼......');
                    }
                }
            })
        </script>
    </body>
</html>